﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;


namespace SkypeApp
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
             form = new SkypeBar();
            Application.Run(form);
        }

        static SkypeBar form;

        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            form.Close();
            Thread.Sleep(30000);
            Application.Restart();
        }
    }
}
